\chapter{Mathematical Framework}
\label{chap:math_framework}

\section{Preliminaries and Notation}

We model hierarchical cooperation over a multi-layer graph $\mathcal{G} = (V, E)$ partitioned into levels $V = V_1 \cup \cdots \cup V_L$. Agents $i \in V_\ell$ possess local state $x_i \in \StateSpace_\ell$ and rule index $r_i \in \mathcal{R}_\ell$. Time is either discrete ($t \in \mathbb{N}$) or continuous ($t \in \mathbb{R}_{\geq 0}$), depending on the dynamical formulation.

\begin{definition}[Neighborhood operator]
\label{def:neighborhood}
For agent $i \in V_\ell$, let $\mathcal{N}_i^{\text{intra}} \subseteq V_\ell$ denote intra-level neighbors and $\mathcal{N}_i^{\text{inter}} \subseteq V_{\ell-1} \cup V_{\ell+1}$ denote inter-level connections. The combined neighborhood is $\mathcal{N}_i = \mathcal{N}_i^{\text{intra}} \cup \mathcal{N}_i^{\text{inter}}$.
\end{definition}

We employ the following notation throughout the book:
\begin{itemize}
    \item $\mathbf{x}(t) = (x_i(t))_{i \in V}$ is the global microstate.
    \item $\Phi_\ell(t) = A_\ell((x_i(t))_{i \in V_\ell})$ is the level-$\ell$ aggregate.
    \item $\Phi(t) = (\Phi_1(t),\ldots,\Phi_L(t))$ is the macrostate vector.
    \item $\mathbf{u}_\ell(t)$ denotes control signals broadcast from level $\ell$ to subordinate levels.
\end{itemize}

\section{Layered Graph and Lattice Models}

Hierarchical cooperation generalizes classical spin systems by coupling intra- and inter-layer interactions.

\begin{definition}[Hierarchical Hamiltonian]
\label{def:hamiltonian}
For Ising-like binary states $s_i \in \{-1,+1\}$, the hierarchical Hamiltonian is
\begin{align}
\mathcal{H}(s) &= - \sum_{\ell=1}^L \sum_{\langle i,j \rangle_\ell} J_\ell(r_i,r_j) s_i s_j - \sum_{\ell=1}^{L-1} \sum_{(i,j) \in C_{\ell,\ell+1}} K_{\ell,\ell+1} s_i s_j \\
&\quad - \sum_{i \in V} h_i(t) s_i - \sum_{\ell=1}^L \sum_{g \in \mathcal{G}_\ell} W_g \prod_{i \in g} s_i,
\end{align}
where $\langle i,j \rangle_\ell$ indexes intra-level edges and $C_{\ell,\ell+1}$ inter-level edges.
\end{definition}

The partition function $Z = \sum_{s \in \{-1,+1\}^{|V|}} e^{-\beta \mathcal{H}(s)}$ yields free energy $F = -\beta^{-1} \log Z$ and order parameters such as magnetization $m_\ell = |V_\ell|^{-1} \sum_{i \in V_\ell} s_i$.

\begin{remark}
Mean-field approximations replace coupling matrices with averaged influences: $s_i \approx \tanh(\beta (\sum_j J_{ij} m_j + h_i))$. Chapter~\ref{chap:stat_mech} revisits these approximations to track critical phenomena across levels.
\end{remark}

\section{Rule-Based Hierarchical Dynamics}

Microscopic updates follow rule-conditioned maps.

\begin{equation}
\label{eq:micro_update}
x_i(t+1) = F_i\big(x_i(t), (x_j(t))_{j \in \mathcal{N}_i}, r_i(t), \epsilon_i(t)\big).
\end{equation}

Rule selection is modulated by local context and macrostate feedback.

\begin{definition}[Rule activation dynamics]
\label{def:rule_activation}
Given utilities $U_{i,k}(t)$ indexed by rule $k$, the probability of activating rule $k$ at time $t$ is
\begin{equation}
\Prob(r_i(t+1)=k \mid \mathcal{F}_t) = \frac{\exp\big(\beta_i U_{i,k}(t)\big)}{\sum_{k' \in \mathcal{R}_\ell} \exp\big(\beta_i U_{i,k'}(t)\big)},
\end{equation}
where $\mathcal{F}_t$ is the information history and $\beta_i$ controls exploration.
\end{definition}

\begin{assumption}[Regularity]
\label{assump:regularity}
Update maps $F_i$ are Lipschitz continuous in their continuous arguments and monotone in discrete selectors. Noise variables $\epsilon_i(t)$ are independent with bounded moments.
\end{assumption}

\section{Hierarchical POMDP with Options}

We frame decision-making via hierarchical partially observable Markov decision processes (Hierarchical POMDPs).

\begin{definition}[Hierarchical POMDP]
\label{def:hpomdp}
A hierarchical POMDP is the tuple $\mathcal{M} = (\StateSpace, \Actions, \Observation, T, O, R, \gamma, \mathcal{O})$ where:
\begin{itemize}
    \item $T$ is the state transition kernel, $O$ the observation model, $R$ the reward function, and $\gamma$ the discount factor.
    \item $\mathcal{O}$ is a set of \emph{options} $o = (I_o, \pi_o, \beta_o)$ with initiation set $I_o$, intra-option policy $\pi_o$, and termination condition $\beta_o$.
    \item Each level $\ell$ selects among options defined on a coarser representation $\StateSpace_\ell$.
\end{itemize}
\end{definition}

Belief updates incorporate option execution traces and aggregated observations.

\begin{equation}
\Belief_{t+1}(s') \propto O(o_t, s', y_{t+1}) \sum_{s \in \StateSpace} T(s, o_t, s') \Belief_t(s).
\end{equation}

\begin{theorem}[Option Policy Improvement]
\label{thm:option_improvement}
Let $\pi$ be a hierarchical policy composed of options and $\pi'$ the policy obtained by improving any option using the hierarchical Bellman operator. Under Assumption~\ref{assump:regularity}, $V^{\pi'}(b) \geq V^{\pi}(b)$ for all beliefs $b$.
\end{theorem}

\begin{proof}
The hierarchical Bellman operator is a \mbox{\emph{contraction}} under the supremum norm when transitions and rewards are bounded. Option improvement corresponds to a policy iteration step; monotonicity follows from standard POMDP option-critic results \cite{bacon2017}. Detailed derivations are provided in Appendix~\ref{app:proofs}.
\end{proof}

\section{Multi-Objective Planning and Resource Constraints}

Global planners balance multiple objectives encoded via utility
\begin{equation}
U = w_Q Q - w_L L - w_C C - w_R R,
\end{equation}
where $Q$ measures quality, $L$ latency, $C$ communication cost, and $R$ risk. We impose resource constraints $g_m(\Phi, \mathbf{u}) \leq 0$ for $m = 1, \ldots, M$.

\begin{proposition}[Bounded Utility]
\label{prop:bounded_utility}
Suppose reward and penalty functions are bounded and convex, and constraint sets are compact. Then the optimal utility $U^*$ is finite and achieved by a mixed strategy over admissible option selections.
\end{proposition}

\begin{proof}
Let $\mathcal{A}_{\text{adm}}$ denote admissible option mixtures. Compactness ensures the existence of maximizing sequences; boundedness of objectives prevents divergence. Convexity implies every extreme point corresponds to a deterministic mixture. Hence the supremum is attained. Proof details appear in Appendix~\ref{app:proofs}.
\end{proof}

\section{Fixed-Point Existence}

Cooperative equilibria emerge as fixed points of coupled update equations.

\begin{theorem}[Existence and Uniqueness of Hierarchical Fixed Points]
\label{thm:fixed_point}
Under Assumption~\ref{assump:regularity}, suppose:\begin{enumerate}
    \item Each $F_i$ is a contraction mapping with modulus $\kappa_i < 1$ when macrostate $\Phi$ is held constant.
    \item Aggregate updates $\Phi_\ell(t+1) = G_\ell(\Phi_\ell(t), \Phi_{\ell-1}(t), \Phi_{\ell+1}(t))$ are Lipschitz with constants satisfying $\sum_{\ell} L_\ell < 1$.
\end{enumerate}
Then there exists a unique fixed point $(\mathbf{x}^*, \Phi^*)$ satisfying \cref{eq:micro_update}.
\end{theorem}

\begin{proof}
Define the joint operator $\mathcal{T}(\mathbf{x}, \Phi)$ combining micro and macro updates. Contractivity of each component yields an overall contraction on a suitable product metric space, invoking Banach's fixed-point theorem.
\end{proof}

\section{Interfaces to Simulation and Experiments}

The constructs above inform the simulation schema in Chapter~\ref{chap:simulation}, where parameter registries mirror symbols introduced here. Constraint sets and utility weights feed into experimental protocols (Chapter~\ref{chap:experiments}) to evaluate coordination efficacy and robustness.

